package cn.edu.zut.soft.student.model;

import java.util.Date;

public class Course {
    private String courseid;

    private String coursetype;

    private String coursename;

    private String info;

    private Integer credits;

    private Integer time;

    private Date begindate;

    private Date enddate;

    public Course(){}

    public Course(Object[] values) {
        this.courseid = values[0].toString();
        this.coursetype = values[1].toString();
        this.coursename = values[2].toString();
        this.info = values[3].toString();
        this.credits = Integer.parseInt((String) values[4]);
        this.time =  Integer.parseInt((String) values[5]);
        this.begindate = (Date) values[6];
        this.enddate = (Date) values[7];
    }

    public String getCourseid() {
        return courseid;
    }

    public void setCourseid(String courseid) {
        this.courseid = courseid == null ? null : courseid.trim();
    }

    public String getCoursetype() {
        return coursetype;
    }

    public void setCoursetype(String coursetype) {
        this.coursetype = coursetype == null ? null : coursetype.trim();
    }

    public String getCoursename() {
        return coursename;
    }

    public void setCoursename(String coursename) {
        this.coursename = coursename == null ? null : coursename.trim();
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info == null ? null : info.trim();
    }

    public Integer getCredits() {
        return credits;
    }

    public void setCredits(Integer credits) {
        this.credits = credits;
    }

    public Integer getTime() {
        return time;
    }

    public void setTime(Integer time) {
        this.time = time;
    }

    public Date getBegindate() {
        return begindate;
    }

    public void setBegindate(Date begindate) {
        this.begindate = begindate;
    }

    public Date getEnddate() {
        return enddate;
    }

    public void setEnddate(Date enddate) {
        this.enddate = enddate;
    }
}